import java.util.Comparator;

/**
 * This is the comparator for Prim algorithm 
 * @author ldong
 *
 */

public class PrimComparator implements Comparator<Record> 
{

	@Override
	public int compare(Record o1, Record o2) {
		if(o1.getLastEdgeWeight() - o2.getLastEdgeWeight()>0)
			return 1;
		else if (o1.getLastEdgeWeight() - o2.getLastEdgeWeight()<0)
			return -1;
		else
		  return 0;
	}
}
